package com.cos.lession76sb2.aop;

import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;

import java.util.Date;

/**
 * @author: COS
 * @time: 2022/10/9 16:25
 * @description:
 */
@Aspect
@Component
@Slf4j
public class MyAdvices {
    @Pointcut("execution(* com.cos.lession76sb2.services..*.*(..))")
    public void t1(){}

    @Before("t1()")
    public void before(JoinPoint jp){
        log.info(new Date()+"执行了:"+jp.getSignature().getName());
    }


}
